package com.ibm.rules;

import java.util.Collection;

import com.google.common.base.Preconditions;

public class RuleSet {
	private Rule[] rules;

	public RuleSet(Collection<Rule> ruleList) {
		Preconditions.checkNotNull(ruleList);
		if (ruleList.size() > 0) {
			this.rules = new Rule[ruleList.size()];
			ruleList.toArray(rules);
		}
	}
	
	public RuleSet(Rule[] rules) {
		this.rules = rules;
	}

	public int size() {
		return rules.length;
	}
	
	public Rule[] getRules() {
		return rules;
	}
}
